package com.android.hedgehog.puzzles;

public class Block {
	public int x1;// pos;
	public int y1;// pos;
	public int x2;// x2;
	public int y2;// y2;
	public int width;
	public int height = 30;// preSET Paddle height

	public Block(int width) {
		this.width = width;
		x1 = 180; // preSET placement
		y1 = 230; // preSET placement
		x2 = x1 + width;
		y2 = y1 + height;

	}
	public void set(int x, int y) {
		x1 = x;
		y1 = y;

		if (x1 < 0) {
			x1 = 0;
		}
		if (x1 > 270) {
			x1 = 270;
		}
		if (y1 < 30) {
			y1 = 30;
		}
		if (y1 > 450) {
			y1 = 450;
		}
		
		x2 = x1 + width;
		y2 = y1 + height;

	}

}
